#ifndef MYSERVER_H
#define MYSERVER_H

#include <string>
#include <pthreads/pthread.h>

class MyServer
{
public:
    MyServer();
    virtual ~MyServer();
    void ListenToPort(const unsigned int &port);
    bool IsRunning();
    void Stop();
    void Log(std::string str);
    pthread_mutex_t mMutex;
protected:
private:
    unsigned int mPort;
    bool mRunning;
    pthread_t mThread;
    void JoinThreads();
    static void *WorkingThread(void *v);

};

#endif // MYSERVER_H
